<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="format-detection" content="telephone=no, email=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
</head>
<body>

<button id="btn1">访问</button>

<script src="jsonp2.js"></script>
<script>
    document.querySelector("#btn1").onclick = function () {
        jsonp({
            url:"http://192.168.1.222:3456",
            jsonp:"cb",
//            jsonpCallback:"foo",
            success:function (data) {
                console.log(data)
            }
        });
    }

</script>

</body>
</html>